package cn.lexi.vip.entity;

import cn.lexi.vip.model.enums.Gender;
import cn.lexi.vip.model.enums.IdType;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @Author Aaron
 */
@Entity
@Getter
@Setter
@ToString
@Table(name = "user_detail")
public class UserDetail implements Serializable {

    private static final long serialVersionUID = -1L;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "phone_no")
    private String phoneNo;

    @Column(name = "name")
    private String name;

    //0 未知 1 女 2 男
    @Column(name = "gender")
    private Gender gender;

    @Column(name = "birthday")
    private Date birthday;

    //头像
    @Column(name = "head_portrait")
    private String headPortrait;

    //证件号
    @Column(name = "id_no")
    private String idNo;

    //0 身份证 1 军官证 2 护照
    @Column(name = "id_type")
    private IdType idType;

    //身份证验真 0 未认证 1认证
    @Column(name = "is_authenticated")
    private Boolean isAuthenticated = false;

    @Column(name = "email")
    private String email;

    @Column(name = "qq")
    private String qq;


    @Column(name = "created_at")
    private Timestamp createdAt;

    //上一次修改时间
    @Column(name = "updated_at")
    private Timestamp updatedAt;

}
